//
//  RecommendController.m
//  LOL视频播放
//
//  Created by 花花蔡 on 2016/12/5.
//  Copyright © 2016年 com.HuaHuaCai. All rights reserved.
//

#import "RecommendController.h"
#import "CLLSegmentView.h"
#import "Public.h"
#import "RecentUpdateController.h"
#import "CompetitionController.h"
#import "GatherViewController.h"
#import "HotAnchorController.h"


@interface RecommendController ()

@end

@implementation RecommendController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"推荐";
    self.view.backgroundColor = [UIColor whiteColor];
    [self addCLLSegmentView];
}

- (void)addCLLSegmentView {
    
    NSArray *buttonNames = @[@"最近更新",@"最新比赛",@"精彩集锦",@"主播解说"];
    //最近更新
    RecentUpdateController *updateVC = [[RecentUpdateController alloc] init];
    //最新比赛
    CompetitionController *competitionVC = [[CompetitionController alloc] init];
    //精彩集锦
    GatherViewController *gatherVC = [[GatherViewController alloc]  init];
    //主播解说
    HotAnchorController *anchorVC = [[HotAnchorController alloc] init];
    //把四个控制器放入数组中
    NSArray *controllers = @[updateVC,competitionVC,gatherVC,anchorVC];
    
    CLLSegmentView *segmentView = [[CLLSegmentView alloc]initWithFrame:CGRectMake(0, 0,screen_width, screen_height-108) buttonNames:buttonNames Controllers:controllers ParentController:self];
    
    [self.view addSubview:segmentView];
    
}


@end
